﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Diablo3.Engine.Property
{
    /// <summary>
    /// 全抗
    /// </summary>
    public class AllResistance : ItemsProperty, IAffecteArcaneHolyResistance, IAffecteColdResistance, IAffecteFireResistance, IAffectePhysicalResistance, IAffectePoisonResistance, IAffecteLightningResistance
    {
        public AllResistance() { }

        public AllResistance(Double value)
        {
            Value = value;
        }

        /// <summary>
        /// 全抗值
        /// </summary>
        public Double Value { get; set; }



        #region IAffecteArcaneHolyResistance 成员

        double IAffecteArcaneHolyResistance.Affecte(double source)
        {
            return Value + source;
        }

        #endregion

        #region IAffecteColdResistance 成员

        double IAffecteColdResistance.Affecte(double source)
        {
            return Value + source;
        }

        #endregion

        #region IAffecteFireResistance 成员

        double IAffecteFireResistance.Affecte(double source)
        {
            return Value + source;
        }

        #endregion

        #region IAffectePhysicalResistance 成员

        double IAffectePhysicalResistance.Affecte(double source)
        {
            return Value + source;
        }

        #endregion

        #region IAffectePoisonResistance 成员

        double IAffectePoisonResistance.Affecte(double source)
        {
            return Value + source;
        }

        #endregion

        #region IAffecteLightningResistance 成员

        double IAffecteLightningResistance.Affecte(double source)
        {
            return Value + source;
        }

        #endregion

        public override string Des
        {
            get { return String.Format("+{0} 全抗性", Value); }
        }
    }
}
